home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / john / hc_showd.hqx / ShowDialog XCMD 1.4 / card_4126.txt < prev    next >
Encoding:
Text File  |  1989-08-30  |  2.4 KB  |  94 lines

  1. -- card: 4126 from stack: in.4
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2607
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   put empty into cd fld "theResult"
  9. end closeCard
  10.  
  11.  
  12. -- part 1 (button)
  13. -- low flags: 00
  14. -- high flags: A003
  15. -- rect: left=119 top=189 right=212 bottom=236
  16. -- title width / last selected line: 0
  17. -- icon id / first selected line: 0 / 0
  18. -- text alignment: 1
  19. -- font id: 0
  20. -- text size: 12
  21. -- style flags: 0
  22. -- line height: 16
  23. -- part name: Dialog Type
  24. ----- HyperTalk script -----
  25. on mouseUp
  26.   put "Do you want to export your data to a text file before quitting HyperCard?" into promptStr
  27.   ShowDialog 1,3758,promptStr,TRUE
  28.   if the result = 1 then
  29.     put "You clicked on the ΓÇ£YESΓÇ¥ button!" into cd fld "theResult"
  30.   else if the result = 2 then
  31.     put "You clicked on the ΓÇ£CANCELΓÇ¥ button!" into cd fld "theResult"
  32.   else if the result = 3 then
  33.     put "You clicked on the ΓÇ£NOΓÇ¥ button!" into cd fld "theResult"
  34.   end if
  35. end mouseUp
  36.  
  37.  
  38.  
  39. -- part 2 (button)
  40. -- low flags: 00
  41. -- high flags: A003
  42. -- rect: left=265 top=189 right=212 bottom=382
  43. -- title width / last selected line: 0
  44. -- icon id / first selected line: 0 / 0
  45. -- text alignment: 1
  46. -- font id: 0
  47. -- text size: 12
  48. -- style flags: 0
  49. -- line height: 16
  50. -- part name: Alert Type
  51. ----- HyperTalk script -----
  52. on mouseUp
  53.   beep 1
  54.   ShowDialog 1,3757,"Do you really want to delete all cards in this stack?",TRUE
  55.   if the result = 1 then
  56.     put "You clicked on the ΓÇ£OKΓÇ¥ button!" into cd fld "theResult"
  57.   else put "You clicked on the ΓÇ£CANCELΓÇ¥ button!" into cd fld "theResult"
  58. end mouseUp
  59.  
  60.  
  61.  
  62. -- part 3 (field)
  63. -- low flags: 01
  64. -- high flags: 0000
  65. -- rect: left=5 top=278 right=302 bottom=505
  66. -- title width / last selected line: 0
  67. -- icon id / first selected line: 0 / 0
  68. -- text alignment: 1
  69. -- font id: 3
  70. -- text size: 12
  71. -- style flags: 0
  72. -- line height: 16
  73. -- part name: theResult
  74.  
  75.  
  76. -- part contents for background part 3
  77. ----- text -----
  78. ShowDialog XCMD Type 1 (continued...)
  79.  
  80. -- part contents for background part 1
  81. ----- text -----
  82.  
  83.  
  84. For alert boxes, you should precede your call to the external with "beep 1."  It is a Macintosh convention that alerts beep when they are displayed on the screen.
  85.  
  86. The item number clicked on will be returned in "the result".  This is only true for ENABLED item numbers.
  87.  
  88. -- part contents for background part 2
  89. ----- text -----
  90. ShowDialog XCMD Type 1 Examples
  91.  
  92. -- part contents for background part 7
  93. ----- text -----
  94. 5